home *** CD-ROM | disk | FTP | other *** search
/ Amiga Developer CD 2.1 / Amiga Developer CD v2.1.iso / Extras / IFF / Old_IFF_Packages / November_1988 / Documents / CompilingIFF < prev    next >
Encoding:
Text File  |  1989-02-23  |  3.9 KB  |  89 lines

  1.  
  2.                  >>> Tips for Compiling IFF Examples <<<
  3.                          Carolyn Scheppner - CBM
  4.  
  5.       IFF examples, in most cases, are not self-contained programs.
  6.    They need to be linked with various IFF modules which contain
  7.    the IFF reader/writer/general routines that are used both directly
  8.    and indirectly by the example.  Information on which IFF modules
  9.    are required by the EA examples in the SOURCE directory can be found
  10.    in the LINKER_INFO directory.  The examples in the EXAMPLES directory
  11.    contain linkage information in their opening comments, and separate
  12.    .with files or makefiles are supplied for some of the examples.
  13.    See the AmigaDos Developer's Manual "The Linker" chapter for more
  14.    info on WITH files.  Examples and modules are listed below.
  15.  
  16.      The IFF header (.h) files are also required when compiling the
  17.    examples.  The headers can be found in the INCLUDE/iff directory.
  18.    I will assume that you have set up your C development system
  19.    so that there is plenty of room on your source & headers work disk.
  20.    Make an "iff" subdirectory in your "include" directory and copy
  21.    the IFF headers there.  Note for AZTEC C people: you may need to
  22.    remove comments inside the parentheses in the function definitions
  23.    in packer.h.
  24.  
  25.      The compiler.h header contains a switch (FDwAT) for compatibility
  26.    with various compilers.  The current IFF modules and include files
  27.    are written for 32-bit compilation, so you will probably have to
  28.    specify 32-bit (long data long code) compilation and link with
  29.    your compiler's 32-bit library.  Optionally, you could adapt the
  30.    IFF code and include files for 16-bit compatibility.  Since the IFF
  31.    code is heavily typed, this would mostly involve putting "L"'s
  32.    on constants, changing any "int"'s to "LONG"'s, and casting untyped
  33.    functions such as "sizeof" to (LONG).  If anyone makes the changes
  34.    necessary for 16-bit compilation, I would appreciate a copy of the
  35.    modified IFF sources and include files.
  36.  
  37.      The OBJECT directory on this disk contains 32-bit Lattice object
  38.    modules.  To compile any IFF example, first compile (without linking)
  39.    the example's source module(s).  Check the example source comments
  40.    or LINKER_INFO directory for information on which standard IFF
  41.    modules must be linked with the example.  If you are using a compiler
  42.    that generates Metacomco compatible object modules (such as Lattice),
  43.    copy the required .o files from the OBJECT directory to your work
  44.    directory and link the example .o(s) with the appropriate startup
  45.    code and modules.  If you are using a compiler that generates a
  46.    different object format, you will need to first recompile the
  47.    required IFF module sources or run them through an object converter
  48.    if your compiler supplies one.
  49.  
  50.      The LINKER_INFO files and source comments are generally in a
  51.    .with file format such as Alink (and Blink ?) understands.
  52.    See the Bantam AmigaDOS manual Assem/Linker chapter for a description
  53.    of .with file usage.  Note that LStartup.obj is equivalent to
  54.    the "c.o" startup module Lattice supplies with their compiler.
  55.  
  56.    Example .with file (LIB: assigned where I keep libs and startups):
  57.  
  58.    FROM     LIB:LStartup.obj, Example.o, iffr.o,*
  59.             ilbmr.o, unpacker.o
  60.    TO       ram:Example
  61.    LIBRARY  LIB:lib/LC.lib, LIB:lib/Amiga.lib
  62.  
  63.  
  64.  
  65.  -------------------------------------------------------------------------
  66.                       >>> List of IFF modules <<<
  67.  
  68.    IFF reader modules:
  69.  
  70.    iffr.o      Lowest level reader rtns
  71.    ilbmr.o     Higher level ILBM reader rtns
  72.    readpict.o  Highest level ILBM reader
  73.    unpacker.o  Unpacking rtn
  74.  
  75.    IFF writer modules:
  76.  
  77.    iffw.o      Lowest level writer rtns
  78.    ilbmw.o     Higher level ILBM writer rtns
  79.    putpict.o   Highest level ILBM writer
  80.    packer.o    Packing rtn
  81.  
  82.    General IFF modules:
  83.  
  84.    gio.o       Fast IO rtns
  85.    remalloc.o  Memory allocation rtns
  86.  
  87. --------------------------------------------------------------------------
  88.  
  89.